# list 部分
lc = ['what','the','fuck']
lc.append('aha')
lc
['what', 'the', 'fuck', 'aha']
lcc = ['?']
l = lc + lcc
l
['what', 'the', 'fuck', 'aha', '?']
l += ['!']
l
['what', 'the', 'fuck', 'aha', '?', '!']
l.insert(2,'fucking')
l
['what', 'the', 'fucking', 'fuck', 'aha', '?', '!']
lcc
['?']
lcc = ['?'] * 2
lcc
['?', '?']

l[2]
'fucking'
l[1:4:2]
['the', 'fuck']
l
['what', 'the', 'fucking', 'fuck', 'aha', '?', '!']
l[6] = '?'
l.pop()
'?'
l.sort()
l
['?', 'aha', 'fuck', 'fucking', 'the', 'what']
l.reverse()
l
['what', 'the', 'fucking', 'fuck', 'aha', '?']


# tuple 部分
tuple = tuple(l)
tuple
('what', 'the', 'fucking', 'fuck', 'aha', '?')

tuple.index('fucking')
2
tuple.count('fuck')
1

# dict 部分
dt = {}
dt['a'] = 1
dt
{'a': '1'}
d = {'b':2,'c':3}
dt.update(d)
dt
{'a': 1, 'b': 2, 'c': 3}
dt.setdefault('d',4)
4
dt
{'a': 1, 'b': 2, 'c': 3, 'd': 4}
dt.get('e',5)
5
dt
{'a': 1, 'b': 2, 'c': 3, 'd': 4}
dt.get('d')
4

dt.keys()
dict_keys(['a', 'b', 'c', 'd'])
dt.values()
dict_values([1, 2, 3, 4])
dt.items()
dict_items([('a', 1), ('b', 2), ('c', 3), ('d', 4)])

list(dt.keys())
['a', 'b', 'c', 'd']
list(dt.values())
[1, 2, 3, 4]
list(dt.items())
[('a', 1), ('b', 2), ('c', 3), ('d', 4)]

dt.update({'e':66})
dt
{'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 66}

dt.pop('e')
66
dt.popitem()
('d', 4)


# set 部分
sc = set()
sc.add('what')
sc
{'what'}

sd = set()
sc
{'what'}
sd.add('where')
sd.union(sc)
{'where', 'what'}

sd
{'where'}
s = sd.union(sc)
s
{'where', 'what'}
'which' in s
False

s.remove('where')
s.discard('what')
s
set()

s.add('waca')
s.add('wow')
s
{'wow', 'waca'}
s.pop()
'wow'
s
{'waca'}